package cn.edu.scau.cmi.ema.dao;

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.springframework.dao.DataAccessException;

import org.springframework.stereotype.Repository;

import org.springframework.transaction.annotation.Transactional;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.Session;


import cn.edu.scau.cmi.ema.domain.*;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;


import cn.edu.scau.cmi.ema.util.CmiSqlUtil;

@Repository("Event9zwzDAO")
@Transactional
public class Event9zwzDAOImpl extends AbstractJpaDao<Event9zwz> implements Event9zwzDAO {

	private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(
			Arrays.asList(new Class<?>[] { Event9zwz.class }));

	@PersistenceContext(unitName = "ema")
	private EntityManager entityManager;

	public Event9zwzDAOImpl() {
		super();
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public Set<Class<?>> getTypes() {
		return dataTypes;
	}

	@Transactional
	public Event9zwz findEvent9zwzById(Integer id) throws DataAccessException {

		return findEvent9zwzById(id, -1, -1);
	}

	@Transactional
	public Event9zwz findEvent9zwzById(Integer id, int startResult, int maxRows) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwzById", startResult, maxRows, id);
			return (Event9zwz) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByNumber(String number) throws DataAccessException {

		return findEvent9zwzByNumber(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByNumber(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByNumber", startResult, maxRows, number);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByNumberContaining(String number) throws DataAccessException {

		return findEvent9zwzByNumberContaining(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByNumberContaining(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByNumberContaining", startResult, maxRows, number);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByName(String name) throws DataAccessException {

		return findEvent9zwzByName(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByName(String name, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByName", startResult, maxRows, name);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByNameContaining(String name) throws DataAccessException {

		return findEvent9zwzByNameContaining(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByNameContaining(String name, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByNameContaining", startResult, maxRows, name);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFood(String food) throws DataAccessException {

		return findEvent9zwzByFood(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFood(String food, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFood", startResult, maxRows, food);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodContaining(String food) throws DataAccessException {

		return findEvent9zwzByFoodContaining(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodContaining(String food, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodContaining", startResult, maxRows, food);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryear(String discoveryear) throws DataAccessException {

		return findEvent9zwzByDiscoveryear(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryear(String discoveryear, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoveryear", startResult, maxRows, discoveryear);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryearContaining(String discoveryear) throws DataAccessException {

		return findEvent9zwzByDiscoveryearContaining(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryearContaining(String discoveryear, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoveryearContaining", startResult, maxRows, discoveryear);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverymonth(String discoverymonth) throws DataAccessException {

		return findEvent9zwzByDiscoverymonth(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverymonth(String discoverymonth, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverymonth", startResult, maxRows, discoverymonth);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverymonthContaining(String discoverymonth) throws DataAccessException {

		return findEvent9zwzByDiscoverymonthContaining(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverymonthContaining(String discoverymonth, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverymonthContaining", startResult, maxRows, discoverymonth);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydetailtime(String discoverydetailtime) throws DataAccessException {

		return findEvent9zwzByDiscoverydetailtime(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydetailtime(String discoverydetailtime, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverydetailtime", startResult, maxRows, discoverydetailtime);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydetailtimeContaining(String discoverydetailtime)
			throws DataAccessException {

		return findEvent9zwzByDiscoverydetailtimeContaining(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydetailtimeContaining(String discoverydetailtime, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverydetailtimeContaining", startResult, maxRows,
				discoverydetailtime);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryprovince(String discoveryprovince) throws DataAccessException {

		return findEvent9zwzByDiscoveryprovince(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryprovince(String discoveryprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoveryprovince", startResult, maxRows, discoveryprovince);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryprovinceContaining(String discoveryprovince)
			throws DataAccessException {

		return findEvent9zwzByDiscoveryprovinceContaining(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoveryprovinceContaining(String discoveryprovince, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoveryprovinceContaining", startResult, maxRows,
				discoveryprovince);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydistrict(String discoverydistrict) throws DataAccessException {

		return findEvent9zwzByDiscoverydistrict(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydistrict(String discoverydistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverydistrict", startResult, maxRows, discoverydistrict);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydistrictContaining(String discoverydistrict)
			throws DataAccessException {

		return findEvent9zwzByDiscoverydistrictContaining(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverydistrictContaining(String discoverydistrict, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverydistrictContaining", startResult, maxRows,
				discoverydistrict);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverycounty(String discoverycounty) throws DataAccessException {

		return findEvent9zwzByDiscoverycounty(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverycounty(String discoverycounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverycounty", startResult, maxRows, discoverycounty);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverycountyContaining(String discoverycounty) throws DataAccessException {

		return findEvent9zwzByDiscoverycountyContaining(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverycountyContaining(String discoverycounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverycountyContaining", startResult, maxRows,
				discoverycounty);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceprovince(String sourceprovince) throws DataAccessException {

		return findEvent9zwzBySourceprovince(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceprovince(String sourceprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourceprovince", startResult, maxRows, sourceprovince);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceprovinceContaining(String sourceprovince) throws DataAccessException {

		return findEvent9zwzBySourceprovinceContaining(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceprovinceContaining(String sourceprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourceprovinceContaining", startResult, maxRows, sourceprovince);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcedistrict(String sourcedistrict) throws DataAccessException {

		return findEvent9zwzBySourcedistrict(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcedistrict(String sourcedistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourcedistrict", startResult, maxRows, sourcedistrict);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcedistrictContaining(String sourcedistrict) throws DataAccessException {

		return findEvent9zwzBySourcedistrictContaining(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcedistrictContaining(String sourcedistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourcedistrictContaining", startResult, maxRows, sourcedistrict);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcecounty(String sourcecounty) throws DataAccessException {

		return findEvent9zwzBySourcecounty(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcecounty(String sourcecounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourcecounty", startResult, maxRows, sourcecounty);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcecountyContaining(String sourcecounty) throws DataAccessException {

		return findEvent9zwzBySourcecountyContaining(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourcecountyContaining(String sourcecounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourcecountyContaining", startResult, maxRows, sourcecounty);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySource(String source) throws DataAccessException {

		return findEvent9zwzBySource(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySource(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySource", startResult, maxRows, source);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceContaining(String source) throws DataAccessException {

		return findEvent9zwzBySourceContaining(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySourceContaining(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySourceContaining", startResult, maxRows, source);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectmaintype(String subjectmaintype) throws DataAccessException {

		return findEvent9zwzBySubjectmaintype(subjectmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectmaintype(String subjectmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySubjectmaintype", startResult, maxRows, subjectmaintype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectmaintypeContaining(String subjectmaintype) throws DataAccessException {

		return findEvent9zwzBySubjectmaintypeContaining(subjectmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectmaintypeContaining(String subjectmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySubjectmaintypeContaining", startResult, maxRows,
				subjectmaintype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubject(String subject) throws DataAccessException {

		return findEvent9zwzBySubject(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubject(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySubject", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectContaining(String subject) throws DataAccessException {

		return findEvent9zwzBySubjectContaining(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzBySubjectContaining(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzBySubjectContaining", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByProducer(String producer) throws DataAccessException {

		return findEvent9zwzByProducer(producer, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByProducer(String producer, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByProducer", startResult, maxRows, producer);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByProducerContaining(String producer) throws DataAccessException {

		return findEvent9zwzByProducerContaining(producer, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByProducerContaining(String producer, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByProducerContaining", startResult, maxRows, producer);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByLaw(String law) throws DataAccessException {

		return findEvent9zwzByLaw(law, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByLaw(String law, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByLaw", startResult, maxRows, law);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByLawContaining(String law) throws DataAccessException {

		return findEvent9zwzByLawContaining(law, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByLawContaining(String law, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByLawContaining", startResult, maxRows, law);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodmaintype(String foodmaintype) throws DataAccessException {

		return findEvent9zwzByFoodmaintype(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodmaintype(String foodmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodmaintype", startResult, maxRows, foodmaintype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodmaintypeContaining(String foodmaintype) throws DataAccessException {

		return findEvent9zwzByFoodmaintypeContaining(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodmaintypeContaining(String foodmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodmaintypeContaining", startResult, maxRows, foodmaintype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodsubtype(String foodsubtype) throws DataAccessException {

		return findEvent9zwzByFoodsubtype(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodsubtype(String foodsubtype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodsubtype", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodsubtypeContaining(String foodsubtype) throws DataAccessException {

		return findEvent9zwzByFoodsubtypeContaining(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodsubtypeContaining(String foodsubtype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodsubtypeContaining", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdultertype(String adultertype) throws DataAccessException {

		return findEvent9zwzByAdultertype(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdultertype(String adultertype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByAdultertype", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdultertypeContaining(String adultertype) throws DataAccessException {

		return findEvent9zwzByAdultertypeContaining(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdultertypeContaining(String adultertype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByAdultertypeContaining", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodbatchfiller(String foodbatchfiller) throws DataAccessException {

		return findEvent9zwzByFoodbatchfiller(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodbatchfiller(String foodbatchfiller, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodbatchfiller", startResult, maxRows, foodbatchfiller);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodbatchfillerContaining(String foodbatchfiller) throws DataAccessException {

		return findEvent9zwzByFoodbatchfillerContaining(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByFoodbatchfillerContaining(String foodbatchfiller, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByFoodbatchfillerContaining", startResult, maxRows,
				foodbatchfiller);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdulterlink(String adulterlink) throws DataAccessException {

		return findEvent9zwzByAdulterlink(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdulterlink(String adulterlink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByAdulterlink", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdulterlinkContaining(String adulterlink) throws DataAccessException {

		return findEvent9zwzByAdulterlinkContaining(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByAdulterlinkContaining(String adulterlink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByAdulterlinkContaining", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverylink(String discoverylink) throws DataAccessException {

		return findEvent9zwzByDiscoverylink(discoverylink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverylink(String discoverylink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverylink", startResult, maxRows, discoverylink);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverylinkContaining(String discoverylink) throws DataAccessException {

		return findEvent9zwzByDiscoverylinkContaining(discoverylink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDiscoverylinkContaining(String discoverylink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDiscoverylinkContaining", startResult, maxRows, discoverylink);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDetectmethod(String detectmethod) throws DataAccessException {

		return findEvent9zwzByDetectmethod(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDetectmethod(String detectmethod, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDetectmethod", startResult, maxRows, detectmethod);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDetectmethodContaining(String detectmethod) throws DataAccessException {

		return findEvent9zwzByDetectmethodContaining(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDetectmethodContaining(String detectmethod, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDetectmethodContaining", startResult, maxRows, detectmethod);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDescription(String description) throws DataAccessException {

		return findEvent9zwzByDescription(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDescription(String description, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDescription", startResult, maxRows, description);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByDescriptionContaining(String description) throws DataAccessException {

		return findEvent9zwzByDescriptionContaining(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByDescriptionContaining(String description, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByDescriptionContaining", startResult, maxRows, description);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByEffect(String effect) throws DataAccessException {

		return findEvent9zwzByEffect(effect, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByEffect(String effect, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByEffect", startResult, maxRows, effect);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByEffectContaining(String effect) throws DataAccessException {

		return findEvent9zwzByEffectContaining(effect, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByEffectContaining(String effect, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByEffectContaining", startResult, maxRows, effect);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByUrl(String url) throws DataAccessException {

		return findEvent9zwzByUrl(url, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByUrl(String url, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByUrl", startResult, maxRows, url);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByUrlContaining(String url) throws DataAccessException {

		return findEvent9zwzByUrlContaining(url, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByUrlContaining(String url, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByUrlContaining", startResult, maxRows, url);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByImported(Boolean imported) throws DataAccessException {

		return findEvent9zwzByImported(imported, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByImported(Boolean imported, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByImported", startResult, maxRows, imported);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzByIslock(Boolean islock) throws DataAccessException {

		return findEvent9zwzByIslock(islock, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByIslock(Boolean islock, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwzByIslock", startResult, maxRows, islock);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@Transactional
	public Event9zwz findEvent9zwzByPrimaryKey(Integer id) throws DataAccessException {
		return findEvent9zwzByPrimaryKey(id, -1, -1);
	}

	@Transactional
	public Event9zwz findEvent9zwzByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwzByPrimaryKey", startResult, maxRows, id);
			return (Event9zwz) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzsByIds(Set<Integer> ids) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwzsByIds", -1, -1, ids);
			return new HashSet(query.getResultList());
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz> findAllEvent9zwzs() throws DataAccessException {

		return findAllEvent9zwzs(-1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findAllEvent9zwzs(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findAllEvent9zwzs", startResult, maxRows);
		return new LinkedHashSet<Event9zwz>(query.getResultList());
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz> findEvent9zwzByCompositeProperities(String sql, int startResult, int maxRows) {
		return new LinkedHashSet<Event9zwz>(createQuery(sql, startResult, maxRows).getResultList());
	}

	@Transactional
	public Set<Event9zwz> findEvent9zwzsByDetachedCriteria(CmiPagination page) throws DataAccessException {
		DetachedCriteria detachedCriteria = CmiSqlUtil.createDetachedCriteria(page, Event9zwz.class);
		Session session = entityManager.unwrap(Session.class);
		Set<Event9zwz> event9zwzs = new HashSet(detachedCriteria.getExecutableCriteria(session)
				.setFirstResult(page.getSearchBeginCursor()).setMaxResults(page.getPaginationSize()).list());

		return event9zwzs;
	}

	@Transactional
	public Event9zwz findEvent9zwzByPhysicalPrimaryKey(String number) throws DataAccessException {
		return findEvent9zwzByPhysicalPrimaryKey(number, -1, -1);
	}

	@Transactional
	public Event9zwz findEvent9zwzByPhysicalPrimaryKey(String number, int startResult, int maxRows)
			throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwzByPhyscialPrimaryKey", startResult, maxRows, number);
			return (Event9zwz) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	public boolean canBeMerged(Event9zwz entity) {
		return true;
	}
}
